package com.ncloud.aaaa.repository;

import java.util.List;

import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;

import com.ncloud.aaaa.model.Role;

public interface RoleRepository extends CrudRepository<Role, Long> {
	Page<Role> findAll(Pageable pageable);

	@Query("select b from UserRole a,Role b where a.id.userId=?1 and a.id.roleId = b.roleId and b.state = '1'")
	List<Role> getRoleListByAccount(Long userId);
}
